Skip to content

Conversation

@atlv24
Copy link
Contributor

@atlv24 atlv24 commented Jan 8, 2026

Objective

Solution

  • new crate bevy_material with MaterialProperties struct that lets one define when a material draws, how it behaves, what shaders it uses, specialization functions, and bind group layouts expected.

Testing

@atlv24 atlv24 marked this pull request as draft January 8, 2026 12:54
@atlv24 atlv24 added A-Rendering Drawing game state to the screen S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 8, 2026
@alice-i-cecile alice-i-cecile added the M-Release-Note Work that should be called out in the blog due to impact label Jan 8, 2026
@alice-i-cecile
Copy link
Member

@atlv24 is this ready for review? You've added the label but it's still in draft mode :)

@Zeophlite
Copy link
Contributor

@atlv24 is this ready for review? You've added the label but it's still in draft mode :)

Waiting on #22408 to merge first

@atlv24
Copy link
Contributor Author

atlv24 commented Jan 9, 2026

the label is "Needs Review" not "Ready for Review" :P

It is reviewable, but i recommend reviewing and letting char's PR merge first.

@Zeophlite
Copy link
Contributor

you can view a clean diff here: https://github.com/tychedelia/bevy/compare/type-erase-more-materials...atlv24:ad/material2?expand=1

Love how simple this is!

@atlv24
Copy link
Contributor Author

atlv24 commented Jan 9, 2026

Yeah im pretty happy with the diff being 1,227 additions and 607 deletions, and the majority of the additions are license files and the new tomls

@atlv24
Copy link
Contributor Author

atlv24 commented Jan 9, 2026

I really appreciate all the exploratory work you did in this space btw @Zeophlite ! It was very useful for determining where we needed another "cut" so to speak to make the crate fall out more cleanly.

@atlv24 atlv24 marked this pull request as ready for review January 13, 2026 20:40
@atlv24 atlv24 added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 13, 2026
Copy link
Contributor

@IceSentry IceSentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was way smaller than I expected LGTM

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a release note stub: this is an important initiative that we should call out.

@alice-i-cecile alice-i-cecile added the M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide label Jan 13, 2026
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've agreed to do a release note in a follow-up PR, so merging now.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 13, 2026
Merged via the queue into bevyengine:main with commit ff376de Jan 13, 2026
44 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Jan 15, 2026
…material` when building docs (#22522)

# Objective

- Add a fix for currently failing Deploy Docs Action. [Example Log is
here](https://github.com/bevyengine/bevy/actions/runs/20974377798/job/60285550096)
- Happening on main since #22426, It appears `bevy_material` is using
`#[doc(fake_variadic)]` in a module, but doc builds for the crate aren’t
building correctly. It suggests `help: add
`#![feature(rustdoc_internals)]` to the crate attributes to enable`

## Solution

- Copy some configuration into `bevy_material` that is already used in
other bevy crates that have `#[doc(fake_variadic)]`, e.g. `bevy_math`
https://github.com/bevyengine/bevy/blob/main/crates/bevy_math/src/lib.rs#L2-L10
which adds the `rustdoc_internals` feature when building docs
- I added the icon stuff while I was at it since that seems to be in
other lib.rs files as well

## Testing

I did not test this, but this seems to be a solved problem already for
the other crates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide M-Release-Note Work that should be called out in the blog due to impact S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants